/*
 * @Author: lokei
 * @Date: 2022-08-28 22:46:40
 * @LastEditors: lokei
 * @LastEditTime: 2022-09-03 09:52:06
 * @Description: 
 */
package cn.lokei.gateway.entity.kafka;

import org.springframework.stereotype.Component;

@Component
public class KafkaConsumer {

	// @KafkaListener(topics = KafkaProducer.TOPIC_TEST, groupId = KafkaProducer.TOPIC_GROUP1)
	// public void topic_test(ConsumerRecord<?, ?> record, Acknowledgment ack,
	// 		@Header(KafkaHeaders.RECEIVED_TOPIC) String topic) {

	// 	Optional message = Optional.ofNullable(record.value());
	// 	if (message.isPresent()) {
	// 		Object msg = message.get();
	// 		log.info("topic_test 消费了： Topic:" + topic + ",Message:" + msg);
	// 		ack.acknowledge();
	// 	}
	// }

	// @KafkaListener(topics = KafkaProducer.TOPIC_TEST, groupId = KafkaProducer.TOPIC_GROUP2)
	// public void topic_test1(ConsumerRecord<?, ?> record, Acknowledgment ack,
	// 		@Header(KafkaHeaders.RECEIVED_TOPIC) String topic) {

	// 	Optional message = Optional.ofNullable(record.value());
	// 	if (message.isPresent()) {
	// 		Object msg = message.get();
	// 		log.info("topic_test1 消费了： Topic:" + topic + ",Message:" + msg);
	// 		ack.acknowledge();
	// 	}
	// }
}